<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>SGP-Web</title>
</h:head>
<h:body>
	<h:form id="form">
		<p:layout fullPage="true">
			<p:layoutUnit position="center"
				header="SGP-Web - Sistema de Gerenciamento Policial Web"
				footer="Gerenciamento do Setor de Transporte">
				<br />
				<div align="center">
					<p:graphicImage value="/images/logo.png" height="150" width="200" />
					<br />
					<h2>ACESSO AO SISTEMA</h2>
					<p:panelGrid columns="2">
						<p:outputLabel value="Login" for="txtLogin" />
						<p:inputText id="txtLogin" value="#{beanSessao.servidor.login}" />
						<p:outputLabel value="Senha" for="txtSenha" />
						<p:password id="txtSenha" value="#{beanSessao.servidor.senha}" />
					</p:panelGrid>
					<br />
					<p:commandButton value="Acessar Sistema"
						action="#{beanSessao.login}" onclick="DLogin.show()"
						update="grdResultado" />
				</div>
				<br />
				<br />
				<br />
				<br />
				<br />
			</p:layoutUnit>

			<p:dialog id="dlgLogin" header="Realizando Login" widgetVar="DLogin" position="center">
				<p:panelGrid id="grdResultado" columns="1">
					<p:outputLabel
						value="Liberado acesso para: #{beanSessao.servidor.nome}" />
					<p:outputLabel
						value="Cargo do Servidor: #{beanSessao.servidor.cargo}" />
				</p:panelGrid>
				<br />
				<div align="center">
					<p:commandButton value="OK" onclick="DLogin.hide()"
						action="#{beanSessao.Acessar_MenuPrincipal}" />
				</div>
			</p:dialog>
		</p:layout>
	</h:form>
</h:body>
</html>